<me:UIWS x:Class="WPFExcelReport.TPWS02VAR"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWS.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTConverter  x:Key="not"/> 
        <ucd:Divideby100  x:Key="d100"/> 
        <ucd:Divideby1000  x:Key="d1000"/> 
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWS.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel>
            <TextBlock Text="{Binding Source={Localization:Translate Word=边字}}"/>
            <ex:TXT72 MaxLength="2" Text="{Binding VAR,ElementName=TV}" Width="40"/>
            <ex:TXT72 MaxLength="20" Text="{Binding DES,ElementName=TV,Converter={StaticResource gb2312}}" Width="200"/>
            <Button Content="{Binding Source={Localization:Translate Word=新增}}" Click="NewCommand" />
            <Button Click="DeleteCommand"  Margin="5,0,0,0"  Content="{Binding Source={Localization:Translate Word=删除}}" /> 
        </WrapPanel>
        <DataGrid    Grid.Row="1"
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0,0,0"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=WAVAR,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=变量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=WABEZ,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=描述}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=WANEUD,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=日期}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIWS>
